# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.MigrationCenter.V1.Model.MachineArchitectureDetails do
  @moduledoc """
  Details of the machine architecture.

  ## Attributes

  *   `bios` (*type:* `GoogleApi.MigrationCenter.V1.Model.BiosDetails.t`, *default:* `nil`) - BIOS Details.
  *   `cpuArchitecture` (*type:* `String.t`, *default:* `nil`) - CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc.
  *   `cpuName` (*type:* `String.t`, *default:* `nil`) - CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc.
  *   `cpuSocketCount` (*type:* `integer()`, *default:* `nil`) - Number of processor sockets allocated to the machine.
  *   `cpuThreadCount` (*type:* `integer()`, *default:* `nil`) - Deprecated: use MachineDetails.core_count instead. Number of CPU threads allocated to the machine.
  *   `firmwareType` (*type:* `String.t`, *default:* `nil`) - Firmware type.
  *   `hyperthreading` (*type:* `String.t`, *default:* `nil`) - CPU hyper-threading support.
  *   `vendor` (*type:* `String.t`, *default:* `nil`) - Hardware vendor.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bios => GoogleApi.MigrationCenter.V1.Model.BiosDetails.t() | nil,
          :cpuArchitecture => String.t() | nil,
          :cpuName => String.t() | nil,
          :cpuSocketCount => integer() | nil,
          :cpuThreadCount => integer() | nil,
          :firmwareType => String.t() | nil,
          :hyperthreading => String.t() | nil,
          :vendor => String.t() | nil
        }

  field(:bios, as: GoogleApi.MigrationCenter.V1.Model.BiosDetails)
  field(:cpuArchitecture)
  field(:cpuName)
  field(:cpuSocketCount)
  field(:cpuThreadCount)
  field(:firmwareType)
  field(:hyperthreading)
  field(:vendor)
end

defimpl Poison.Decoder, for: GoogleApi.MigrationCenter.V1.Model.MachineArchitectureDetails do
  def decode(value, options) do
    GoogleApi.MigrationCenter.V1.Model.MachineArchitectureDetails.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.MigrationCenter.V1.Model.MachineArchitectureDetails do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
